import requestApi from "ssccommon/components/requestApi";

import {ajax } from 'nc-lightapp-front';

let requestDomain =  '';

let requestApiOverwrite = {
    ...requestApi,

    query:(opt) => {
        ajax({
            url: `${requestDomain}/nccloud/erm/ersetting/ErmInvoiceInputtaxQueryAction.do`,
            data: opt.data,
            success: (data) => {
                data = data.data;
                opt.success(data);
            }
        })
    },

    save: (opt) => {
        ajax({
            url: `${requestDomain}/nccloud/erm/ersetting/ErmInvoiceInputtaxRuleSaveAction.do`,
            data: opt.data,
            success: (data) => {
                if (data.success) {
                    data = data.data;
                    opt.success(data);
                }
            }
        })
    }
}

export default  requestApiOverwrite;
